| | |
| | | import com.java110.store.bmo.contractTypeTemplate.IUpdateContractTypeTemplateBMO; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestHeader; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | @RestController |
| | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param storeId 商户ID |
| | | * @param storeId 商户ID |
| | | * @param expiration 到期合同标记 1 到期合同 |
| | | * @return |
| | | * @serviceCode /contract/queryContract |
| | | * @path /app/contract/queryContract |
| | |
| | | @RequestMapping(value = "/queryContract", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryContract(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestParam(value = "state", required = false) String state, |
| | | @RequestParam(value = "expiration", required = false) String expiration, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | ContractDto contractDto = new ContractDto(); |
| | |
| | | contractDto.setRow(row); |
| | | contractDto.setStoreId(storeId); |
| | | contractDto.setState(state); |
| | | //如果是到期合同 |
| | | if ("1".equals(expiration)) { |
| | | contractDto.setNoStates(new String[]{ContractDto.STATE_COMPLAINT, ContractDto.STATE_FAIL}); |
| | | contractDto.setEndTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | } |
| | | return getContractBMOImpl.get(contractDto); |
| | | } |
| | | |
| | |
| | | contractChangePlanPo.setState(ContractChangePlanDto.STATE_W); |
| | | contractChangePlanPo.setRemark(reqJson.getString("changeRemark")); |
| | | |
| | | ContractChangePlanDetailPo contractChangePlanDetailPo = BeanConvertUtil.covertBean(reqJson,ContractChangePlanDetailPo.class); |
| | | ContractChangePlanDetailPo contractChangePlanDetailPo = BeanConvertUtil.covertBean(reqJson, ContractChangePlanDetailPo.class); |
| | | contractChangePlanDetailPo.setStoreId(storeId); |
| | | return saveContractChangePlanBMOImpl.save(contractChangePlanPo,contractChangePlanDetailPo); |
| | | return saveContractChangePlanBMOImpl.save(contractChangePlanPo, contractChangePlanDetailPo); |
| | | } |
| | | |
| | | /** |
| | |
| | | public ResponseEntity<String> queryContractChangePlan(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row, |
| | | @RequestParam(value = "contractId",required = false) String contractId, |
| | | @RequestParam(value = "contractName",required = false) String contractName, |
| | | @RequestParam(value = "planId",required = false) String planId |
| | | @RequestParam(value = "contractId", required = false) String contractId, |
| | | @RequestParam(value = "contractName", required = false) String contractName, |
| | | @RequestParam(value = "planId", required = false) String planId |
| | | ) { |
| | | ContractChangePlanDto contractChangePlanDto = new ContractChangePlanDto(); |
| | | contractChangePlanDto.setPage(page); |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryContractChangePlanDetail", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryContractChangePlanDetail(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestParam(value = "planId",required = false) String planId, |
| | | @RequestParam(value = "contractId",required = false) String contractId, |
| | | @RequestParam(value = "planId", required = false) String planId, |
| | | @RequestParam(value = "contractId", required = false) String contractId, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | ContractChangePlanDetailDto contractChangePlanDetailDto = new ContractChangePlanDetailDto(); |