| | |
| | | import com.example.erp.dto.sd.DeliveryDetailDTO; |
| | | import com.example.erp.dto.sd.DeliveryDetailProductDTO; |
| | | import com.example.erp.entity.sd.*; |
| | | import com.example.erp.entity.userInfo.Log; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.mapper.mm.FinishedGoodsInventoryMapper; |
| | | import com.example.erp.mapper.sd.*; |
| | | import com.example.erp.service.userInfo.LogService; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | CustomerMapper customerMapper; |
| | | @Autowired |
| | | SysErrorService sysErrorService; |
| | | @Autowired |
| | | LogService logService; |
| | | |
| | | |
| | | public Map<String, Object> getSelectCustomer(Integer pageNum, Integer pageSize, Customer customer) { |
| | |
| | | |
| | | public Boolean insertCustomer(Map<String,Object> object) { |
| | | boolean saveState = true; |
| | | Log log = new Log(); |
| | | log.setOperatorId(object.get("userId").toString()); |
| | | log.setOperator(object.get("userName").toString()); |
| | | log.setContent(object.toString()); |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | try { |
| | |
| | | if(customer!=null){ |
| | | if (customer.getId()!=null && customer.getId()!=0){ |
| | | customerMapper.updateCustomer(customer); |
| | | log.setFunction("insertCustomer修改"); |
| | | }else{ |
| | | customerMapper.insertCustomer(customer); |
| | | log.setFunction("insertCustomer新增"); |
| | | } |
| | | logService.saveLog(log); |
| | | |
| | | } |
| | | |
| | |
| | | if (customer.getId()!=null){ |
| | | customerMapper.deleteCustomer(customer); |
| | | } |
| | | Log log = new Log(); |
| | | log.setOperatorId(object.get("userId").toString()); |
| | | log.setOperator(object.get("userName").toString()); |
| | | log.setContent(object.toString()); |
| | | log.setFunction("deleteCustomer删除"); |
| | | logService.saveLog(log); |
| | | |
| | | } |
| | | |