Commit 7fa92d8a authored by 廖旭伟's avatar 廖旭伟

bug修改

parent c1b691c3
package com.mortals.xhx.module.record.dao.ibatis;
import com.mortals.framework.util.EntityUtil;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.record.dao.ApplyLogDao;
import com.mortals.xhx.module.record.model.ApplyLogEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 证照申请DaoImpl DAO接口
*
......@@ -16,6 +21,19 @@ import java.util.List;
@Repository("applyLogDao")
public class ApplyLogDaoImpl extends BaseCRUDDaoMybatis<ApplyLogEntity,Long> implements ApplyLogDao {
@Override
public int update(ApplyLogEntity entity) {
Map<String,Object> data = new HashMap();
EntityUtil.entityToMap(entity, data);
Map condition = new HashMap();
condition.put(this.getPrimaryKeyLabel(), entity.getId());
if(entity.getValidityStart()==null){
data.put("validityStart",null);
}
if(entity.getValidityEnd()==null){
data.put("validityEnd",null);
}
return this.update((Map)data, (Map)condition);
}
}
......@@ -220,9 +220,12 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
// formContentJson.put("i_14_制证机关",applyLogEntity.getAuthority());
formContentJson.put("@qrcode_1_二维码",applyLogEntity.getSocialCode());
if(CollectionUtils.isNotEmpty(applyLogEntity.getChildCertificate())){
int index = 1;
for(int i = 0;i<applyLogEntity.getChildCertificate().size();i++){
int index = i+1;
formContentJson.put("i_"+ index +"_子证",applyLogEntity.getChildCertificate().get(i).getShortName());
if(applyLogEntity.getChildCertificate().get(i).getStatus()==1) {
formContentJson.put("i_" + index + "_子证", applyLogEntity.getChildCertificate().get(i).getShortName());
index++;
}
}
}
applyLogEntity.setFormContent(formContentJson.toJSONString());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment