|
@@ -31,6 +31,7 @@ import com.goafanti.common.model.Notice;
|
|
|
import com.goafanti.common.model.User;
|
|
import com.goafanti.common.model.User;
|
|
|
import com.goafanti.common.utils.DateUtils;
|
|
import com.goafanti.common.utils.DateUtils;
|
|
|
import com.goafanti.common.utils.StringUtils;
|
|
import com.goafanti.common.utils.StringUtils;
|
|
|
|
|
+import com.goafanti.contract.bo.ContractClientListBo;
|
|
|
import com.goafanti.contract.bo.ContractDetail;
|
|
import com.goafanti.contract.bo.ContractDetail;
|
|
|
import com.goafanti.contract.bo.ContractManageListBo;
|
|
import com.goafanti.contract.bo.ContractManageListBo;
|
|
|
import com.goafanti.contract.bo.ContractSerialNumber;
|
|
import com.goafanti.contract.bo.ContractSerialNumber;
|
|
@@ -130,6 +131,67 @@ public class ContractServiceImpl extends BaseMybatisDao<ContractMapper> implemen
|
|
|
return (Pagination<ContractManageListBo>) findPage("findManageContractListByPage", "findManageContractCount",
|
|
return (Pagination<ContractManageListBo>) findPage("findManageContractListByPage", "findManageContractCount",
|
|
|
params, pNo, pSize);
|
|
params, pNo, pSize);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public Pagination<ContractClientListBo> getClientList(String contractId, Integer serialNumber, Integer type,
|
|
|
|
|
+ Integer status, String startDateFormattedDate, String endDateFormattedDate, Integer pNo, Integer pSize) {
|
|
|
|
|
+ Date cStart = null;
|
|
|
|
|
+ Date cEnd = null;
|
|
|
|
|
+
|
|
|
|
|
+ Map<String, Object> params = new HashMap<>();
|
|
|
|
|
+
|
|
|
|
|
+ params.put("uid", TokenManager.getUserId());
|
|
|
|
|
+
|
|
|
|
|
+ if (null != serialNumber) {
|
|
|
|
|
+ params.put("serialNumber", serialNumber);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (null != type) {
|
|
|
|
|
+ params.put("type", type);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (null != status) {
|
|
|
|
|
+ params.put("status", status);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!StringUtils.isBlank(contractId)) {
|
|
|
|
|
+ params.put("id", contractId);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!StringUtils.isBlank(startDateFormattedDate)) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ cStart = DateUtils.parseDate(startDateFormattedDate, AFTConstants.YYYYMMDD);
|
|
|
|
|
+ } catch (ParseException e) {
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (null != cStart) {
|
|
|
|
|
+ params.put("cStart", cStart);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!StringUtils.isBlank(endDateFormattedDate)) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ cEnd = DateUtils.parseDate(endDateFormattedDate, AFTConstants.YYYYMMDD);
|
|
|
|
|
+ } catch (ParseException e) {
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (null != cEnd) {
|
|
|
|
|
+ params.put("cEnd", cEnd);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (pNo == null || pNo < 0) {
|
|
|
|
|
+ pNo = 1;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (pSize == null || pSize < 0) {
|
|
|
|
|
+ pSize = 10;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return (Pagination<ContractClientListBo>) findPage("findClientContractListByPage", "findClientContractCount",
|
|
|
|
|
+ params, pNo, pSize);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public Contract saveManageContract(Contract c) {
|
|
public Contract saveManageContract(Contract c) {
|
|
@@ -265,6 +327,10 @@ public class ContractServiceImpl extends BaseMybatisDao<ContractMapper> implemen
|
|
|
return contractMapper.batchDeleteByPrimaryKey(id);
|
|
return contractMapper.batchDeleteByPrimaryKey(id);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
private Notice createNotice(Contract c, ContractLog l) {
|
|
private Notice createNotice(Contract c, ContractLog l) {
|
|
|
Contract info = contractMapper.selectByPrimaryKey(c.getId());
|
|
Contract info = contractMapper.selectByPrimaryKey(c.getId());
|
|
|
|
|
|